const { DataTypes } = require('sequelize');

const UserSchema = {
    userid: {
        type: DataTypes.INTEGER,
        primaryKey: true
    },
    username: {
        type: DataTypes.STRING,
        allowNull: false
    },
    password: {
        type: DataTypes.STRING,
        allowNull: false
    },
    name: {
        type: DataTypes.STRING,
        allowNull: false
    },
    avatar: {
        type: DataTypes.TEXT,
    },
    email: {
        type: DataTypes.STRING
    },
    signature: {
        type: DataTypes.TEXT
    },
    title: {
        type: DataTypes.STRING
    },
    group: {
        type: DataTypes.TEXT
    },
    notifyCount: {
        type: DataTypes.INTEGER
    },
    unreadCount: {
        type: DataTypes.INTEGER
    },
    country: {
        type: DataTypes.STRING
    },
    access: {
        type: DataTypes.STRING
    },
    province: {
        type: DataTypes.STRING
    },
    city: {
        type: DataTypes.STRING
    },
    address: {
        type: DataTypes.TEXT
    },
    phone: {
        type: DataTypes.STRING
    }
}

module.exports = UserSchema;